import httpRequest from 'utils/httpRequest'

export default {
    //添加用户
    addUser(type,data){
        return httpRequest.post(`/sys/user/${type}`, data)
    },
    //删除用户
    deleteUserList(data){
        return httpRequest.post('/sys/user/delete', data)
    },
    //修改密码
    resetPassword(data){
        return httpRequest.post('/sys/user/password',data)
    },
    //获取角色列表
    getRolesSelect(params){
        return httpRequest.get('/sys/role/select', params)
    },
    //获取用户信息
    getUserInfo(id,params){
        return httpRequest.get(`/sys/user/info/${id}`, params)
    },
    //获取角色列表
    getRolesList(params){
        return httpRequest.get('/sys/role/list', params)
    },
    //删除角色
    deleteRolesList(data){
        return httpRequest.post('/sys/role/delete', data)
    },
    //获取菜单列表
    getMenuList(params){
        return httpRequest.get('/sys/menu/list', params)
    },
    //获取角色信息
    getRoleInfo(id,params){
        return httpRequest.get(`/sys/role/info/${id}`, params)
    },
    //添加/更新角色信息
    addRoles(type,data){
        return httpRequest.post(`/sys/role/${type}`, data)
    },
    //删除菜单
    deleteMenuList(id,data){
        return httpRequest.post(`/sys/menu/delete/${id}`, data)
    },
    //获取菜单选项
    getMenuSelect(params){
        return httpRequest.get('/sys/menu/select', params)
    },
    //获取菜单选项
    getMenuInfo(id,params){
        return httpRequest.get(`/sys/menu/info/${id}`, params)
    },
    //添加/更新菜单
    addMenuList(type,data){
        return httpRequest.post(`/sys/menu/${type}`, data)
    },
    //获取定时任务列表
    getScheduleList(params){
        return httpRequest.get('/sys/schedule/list', params)
    },
    //添加/更新定时任务
    addSchedule(id,data){
        return httpRequest.post(`/sys/schedule/${id}`, data)
    },
    //获取定时任务详情
    getScheduleInfo(id,params){
        return httpRequest.get(`/sys/schedule/info/${id}`, params)
    },
    //定时任务开始
    runSchedule(data){
        return httpRequest.post('/sys/schedule/run', data)
    },
    //定时任务暂停
    pauseSchedule(data){
        return httpRequest.post('/sys/schedule/pause', data)
    },
    //定时任务恢复
    resumeSchedule(data){
        return httpRequest.post('/sys/schedule/resume', data)
    },
    //删除定时任务
    deleteSchedule(data){
        return httpRequest.post('/sys/schedule/delete', data)
    },
    //获取定时任务日志列表
    getScheduleLog(params){
        return httpRequest.get('/sys/scheduleLog/list', params)
    },
    //获取定时任务日志详情
    getErrScheduleInfo(id,params){
        return httpRequest.get(`/sys/scheduleLog/info/${id}`, params)
    },
    //获取定时任务日志详情
    getErrScheduleInfo(id,params){
        return httpRequest.get(`/sys/scheduleLog/info/${id}`, params)
    },
    //获取参数列表
    getConfigList(params){
        return httpRequest.get('/sys/config/list', params)
    },
    //获取参数详情
    getConfigInfo(id,params){
        return httpRequest.get(`/sys/config/info/${id}`, params)
    },
    //删除参数列表
    deleteConfigList(data){
        return httpRequest.post('/sys/config/delete', data)
    },
    //添加/更新参数列表
    addConfigList(type,data){
        return httpRequest.post(`/sys/config/${type}`, data)
    },
    //获取系统日志列表
    getLogList(params){
        return httpRequest.get('/sys/log/list', params)
    },
    //组织机构部门列表
    getDeptList(params){
        return httpRequest.get('/sys/dept/list', params)
    },
    //组织机构信息
    getDeptInfo(id,params){
        return httpRequest.get(`/sys/dept/info/${id}`, params)
    },
    //添加组织机构
    saveDept(data){
        return httpRequest.post('/sys/dept/save', data)
    },
    //修改组织机构
    updateDept(data){
        return httpRequest.post('/sys/dept/update', data)
    },
    //删除组织机构
    deleteDept(data){
        return httpRequest.post('/sys/dept/delete', data)
    },
    //模板下载
    downDept(params){
        return httpRequest.get('/sys/dept/download',params)
    },
    //模板导入
    downImport(data){
        return httpRequest.post('/sys/dept/import', data)
    },
    //获取角色分类
    getQueryRoleList(data){
        return httpRequest.get('/baseDict/roleList',data)
    },
    //新增数据字典
    addAaveDepartment(data){
        return httpRequest.post('/baseDict/saveDepartment', data)
    },
    //修改数据字典数据
    updateDepartment(data){
        return httpRequest.post('/baseDict/updateDepartment', data)
    },
    //删除数据字典信息
    deleteDepartment(data){
        return httpRequest.post('/baseDict/deleteDepartment', data)
    }
}